package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the RESERVA_RZ_SOC database table.
 * 
 */
@Entity
@Table(name="RESERVA_RZ_SOC")
public class ReservaRzSoc implements Serializable {
	private static final long serialVersionUID = 1L;
	private long refnumTitu;
	private String agntSync;
	private String anoTitu;
	private String coPais;
	private String numTitu;
	private String razSocRes;
	private String siglas;
	private Date tsUltSync;
	private Titulo titulo;

    public ReservaRzSoc() {
    }


	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="REFNUM_TITU", unique=true, nullable=false)
	public long getRefnumTitu() {
		return this.refnumTitu;
	}

	public void setRefnumTitu(long refnumTitu) {
		this.refnumTitu = refnumTitu;
	}


	@Column(name="AGNT_SYNC", length=4)
	public String getAgntSync() {
		return this.agntSync;
	}

	public void setAgntSync(String agntSync) {
		this.agntSync = agntSync;
	}


	@Column(name="ANO_TITU", length=4)
	public String getAnoTitu() {
		return this.anoTitu;
	}

	public void setAnoTitu(String anoTitu) {
		this.anoTitu = anoTitu;
	}


	@Column(name="CO_PAIS", length=3)
	public String getCoPais() {
		return this.coPais;
	}

	public void setCoPais(String coPais) {
		this.coPais = coPais;
	}


	@Column(name="NUM_TITU", length=8)
	public String getNumTitu() {
		return this.numTitu;
	}

	public void setNumTitu(String numTitu) {
		this.numTitu = numTitu;
	}


	@Column(name="RAZ_SOC_RES", length=250)
	public String getRazSocRes() {
		return this.razSocRes;
	}

	public void setRazSocRes(String razSocRes) {
		this.razSocRes = razSocRes;
	}


	@Column(length=100)
	public String getSiglas() {
		return this.siglas;
	}

	public void setSiglas(String siglas) {
		this.siglas = siglas;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_ULT_SYNC")
	public Date getTsUltSync() {
		return this.tsUltSync;
	}

	public void setTsUltSync(Date tsUltSync) {
		this.tsUltSync = tsUltSync;
	}


	//bi-directional one-to-one association to Titulo
	@OneToOne
	@JoinColumn(name="REFNUM_TITU", nullable=false, insertable=false, updatable=false)
	public Titulo getTitulo() {
		return this.titulo;
	}

	public void setTitulo(Titulo titulo) {
		this.titulo = titulo;
	}
	
}